home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / architecture / hppa / pseudo_inst.h < prev   
Text File  |  1994-06-08  |  988b  |  53 lines

  1. /* Copyright (c) 1991 NeXT Computer, Inc.  All rights reserved.
  2.  *
  3.  *    File:    architecture/hppa/pseudo_inst.h
  4.  *    Author:    Josh Doenias, NeXT Computer, Inc.
  5.  *
  6.  *    This header file defines assembler pseudo-instruction macros for
  7.  *    for the HP PA-RISC architecture.
  8.  *
  9.  *    NOTE: This is obviously only useful to include in assembly
  10.  *    code source.
  11.  *
  12.  * HISTORY
  13.  * 05-Aug-93  Josh Doenias (josh@next.com)
  14.  *    Created.
  15.  */
  16.  
  17. #ifndef    _ARCH_HPPA_PSEUDO_INST_H_
  18. #define    _ARCH_HPPA_PSEUDO_INST_H_
  19. #ifdef    __ASSEMBLER__
  20.  
  21. /*
  22.  * Pseudo instruction definitions
  23.  */
  24.  
  25. /*
  26.  * ldi32    IMMED,%rD
  27.  *
  28.  * Load 32-bit immediate into rD
  29.  */
  30. .macro    ldi32                // ldi32    immed,reg
  31. .if    $n != 2
  32.     .abort    "invalid operands of li32"
  33. .endif
  34. .abs    __is_abs,$0
  35. .if    !__is_abs
  36.     ldil    L`$0,$1
  37.     ldo    R`$0($1),$1
  38. .elseif    $0 == 0
  39.     add    %r0,%r0,$1
  40. .elseif    ($0 & 0xffffc000) == 0
  41.     ldo    $0(%r0),$1
  42. .elseif    ($0 & 0x7ff) == 0
  43.     ldil    $0,$1
  44. .else
  45.     ldil    L`$0,$1
  46.     ldo    R`$0($1),$1
  47. .endif
  48. .endmacro
  49.  
  50. #endif    __ASSEMBLER__
  51.  
  52. #endif    _ARCH_HPPA_PSEUDO_INST_H_
  53.